<?php echo $this->Session->flash(); ?>

<div id="loading" style="display: none;">
    <?php echo $html->image('loading.gif', array('border' => "0", 'align' => 'center')); ?>
</div>
<?php
echo $form->create('Property');
echo $form->hidden('Property.id');
?>
<?php
echo $ajax->observeField('PropertyDepartamentId', array(
    'url' => array('action' => 'select'),
    'frequency' => 0.2,
    'update' => 'ciudades'
        )
);
?>
<table>
    <thead>
        <tr>
            <th>Tipo de dato</th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Código</td>
            <td><?php echo $codigo["Property"]["codigo"]; ?></td>
        </tr>
        <tr>
            <td>Nombre</td>
            <td><?php echo $form->input("Property.nombre", array('label' => '')); ?></td>
        </tr>
        <tr>
            <td>Departamento</td>
            <td><?php
echo $form->input('Property.departament_id', array(
    'label' => '',
    'empty' => __('Seleccione Departamento', true),
    'selected' => $dp,
));
?></td>
        </tr>
        <tr>
            <td>Municipio</td>
            <td>
                <div id="ciudades">
                    <?php echo $form->input("Property.city_id", array('label' => '', 'type' => 'select', 'empty' => 'Seleccione Ciudad')); ?>
                </div>
            </td>
        </tr>
        <tr>
            <td>Vereda</td>
            <td><?php echo $form->input("Property.vereda", array('label' => '')); ?></td>
        </tr>
        <tr>
            <td>Área negociación</td>
            <td><?php echo $form->input("Property.area_negociacion", array('label' => '')); ?></td>
        </tr>
        <tr>
            <td>Área titulo</td>
            <td><?php echo $form->input("Property.area_titulo", array('label' => '')); ?></td>
        </tr>
        <tr>
            <td>Matricula</td>
            <td><?php echo $form->input("Property.matricula", array('label' => '')); ?></td>
        </tr>
        <tr>
            <td>Número predial</td>
            <td> </td>
        </tr>
    </tbody>
</table>
<h1>Número predial</h1>
<table>
    <thead>
        <tr>
            <th>Código</th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Departamento</td>
            <td><?php echo $form->input("Property.np_departamento", array('label' => '')); ?> </td>
        </tr>
        <tr>
            <td>Municipio</td>
            <td><?php echo $form->input("Property.np_municipio", array('label' => '')); ?> </td>
        </tr>
        <tr>
            <td>Tipo avaluo</td>
            <td><?php echo $form->input("Property.np_tipo", array('label' => '')); ?> </td>
        </tr>
        <tr>
            <td>Sector</td>
            <td><?php echo $form->input("Property.np_sector", array('label' => '')); ?> </td>
        </tr>
        <tr>
            <td>Vereda</td>
            <td><?php echo $form->input("Property.np_vereda", array('label' => '')); ?> </td>
        </tr>
        <tr>
            <td>Predio</td>
            <td><?php echo $form->input("Property.np_predio", array('label' => '')); ?> </td>
        </tr>
        <tr>
            <td>Mejora</td>
            <td><?php echo $form->input("Property.np_mejora", array('label' => '')); ?> </td>
        </tr>
        <tr>
            <td> </td>
            <td><?php
                    echo $ajax->submit('Guardar', array('url' => array('controller' => 'Properties', 'action' => 'property_edit', $this->data['Property']['id']), 'update' => 'content', 'complete' => 'cargar()', 'indicator' => 'loading'));
                    echo $form->end();
                    ?> </td>
        </tr>
    </tbody>
</table>
<br>
<br>